package com.zhuss.repair.db.dao.ext;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import com.zhuss.bean.bo.repair.repair.SearchRepairBo;
import com.zhuss.bean.vo.food.food.DetailFoodVo;
import com.zhuss.bean.vo.repair.repair.DetailRepairVo;
import com.zhuss.bean.vo.repair.repair.ListRepairVo;
import com.zhuss.repair.db.dao.gen.RepairMapper;
import com.zhuss.repair.db.entity.Repair;
import com.zhuss.repair.db.entity.RepairAudit;

@Mapper
public interface RepairAuditDao {

	/*@Insert("INSERT INTO t_repair_audit (repair_id,deal_user_id,remark,audit,reply_time,create_time) VALUES (#{repair_id},#{deal_user_id},#{remark},#{audit},NOW(),NOW())")
	void insertAudit(RepairAudit repairAudit);*/
	/*@Update("update t_repair set step = 2,audit = 99 where id = #{repair_id}")
	void fanKui22222(RepairAudit record);*/
	/*@Update("update t_repair set step = 2,audit = 1 where id = #{repair_id}")
	void qianShou(RepairAudit record);*/
	/*@Update("update t_repair set step = 1,audit = 1 where id = #{id}")
	void paiDanBack(Repair record);*/
	
	//报修审核表添加数据
	@Insert("INSERT INTO t_repair_audit (repair_id,wuye_id,deal_user_id,remark,audit,reply_time,create_time,weixiu_user_id) VALUES (#{repair_id,jdbcType=INTEGER},#{wuye_id,jdbcType=INTEGER},#{deal_user_id,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{audit,jdbcType=INTEGER},#{reply_time},NOW(),#{weixiu_user_id,jdbcType=INTEGER})")
	void insertPaiDan(RepairAudit repairAudit);
	
	
	//报修表更新状态
	@Update("update t_repair set step = #{step},audit = #{audit} where id = #{repair_id}")
	void updateRepairStatus(RepairAudit record);	

	//报修撤回删除指定数据
	@Delete("DELETE FROM t_repair_audit WHERE repair_id = #{repair_id}")
	void deleteAudit(RepairAudit repairAudit);


	
	List<ListRepairVo> list(SearchRepairBo bo);


	Integer countList(SearchRepairBo bo);
	

	
    
}